package com.story.modular.app.warpper;

import com.story.common.constant.factory.ConstantFactory;
import com.story.core.base.warpper.BaseControllerWarpper;
import com.story.core.util.ToolUtil;

import java.util.Map;

/**
 * @author Administrator
 * @decription 专辑封装类
 * @Date 2017-12-21 15:02
 */
public class CategoryWarpper extends BaseControllerWarpper {

    public CategoryWarpper(Object list) {
        super(list);
    }

    @Override
    protected void warpTheMap(Map<String, Object> map) {
        Integer id = (Integer) map.get("id");

        if (ToolUtil.isEmpty(id) || id.equals(0)) {
            map.put("cName", "--");
        } else {
            map.put("cName", ConstantFactory.me().getVedioName(id));
        }
    }

}
